from baseSnake import *
import os

GRID_SIZE = 25
SPEED_LOCK_SECONDS = 5

os.environ['SDL_VIDEO_CENTERED'] = '1'


def show_text(screen, pos, text, color, font_bold = False, font_size = 60, font_italic = False):
    #获取系统字体，并设置文字大小
    cur_font = pygame.font.SysFont("宋体", font_size)
    #设置是否加粗属性
    cur_font.set_bold(font_bold)
    #设置是否斜体属性
    cur_font.set_italic(font_italic)
    #设置文字内容
    text_fmt = cur_font.render(text, 1, color, (0,0,0))
    #绘制文字
    screen.blit(text_fmt, pos)


def marie_snake_runner(screen_x=1200, screen_y=750):
    pygame.init()
    screen_size = (screen_x, screen_y)
    screen = pygame.display.set_mode(screen_size)
    clock = pygame.time.Clock()

    while True:
        for event in pygame.event.get():
            if event.type == pygame.QUIT:
                return

        # 显示分数文字
        show_text(screen, (100, screen_y//2), 'Coming soon!', (223, 223, 223), font_size=40)

        pygame.display.update()
        clock.tick(5)


if __name__ == '__main__':
    marie_snake_runner()

